The present invention relates to a technique for motion compensating video picture data, encoding the motion compensated video picture data and recording such encoded video picture data.
A high-efficiency encoding system may conform to a Moving Picture Imaging Coding Experts Group (MPEG) standard. This MPEG system may be derived from an international standard prescriptions known as a video code for audiovisual services at p.times.64 kbit/s Recommendation H.261 of ITU-T (International Telecommunication Union-Telecommunication Standardization Sector). The MPEG system may have a storage medium, such as a CD-ROM or the like, and may utilize motion compensation prediction for inter-frame prediction and discrete cosine transform (DCT) as an orthogonal transformation.
FIG. 8 illustrates a picture encoding device 200 which utilizes the above-mentioned MPEG system. As shown therein, such picture encoding device 200 generally includes a subtraction circuit 201, a DCT circuit 202, a quantization circuit 203, a variable length encoding circuit 204, a dequantization circuit 205, an inverse DCT circuit 206, an addition circuit 207, frame memories 208 and 210, a motion compensation circuit 209, and a motion vector detection circuit 211.
Video signals, which may represent blocks of pixels having a predetermined size (for example, 16.times.16 pixel blocks) which are obtained or divided from a current standard frame, may be supplied to an input terminal of the picture encoding device 200. Such video signals may be supplied therefrom as reference frame data to the frame memory 210, the motion vector detection circuit 211 and one input of the subtraction circuit 201.
The frame memory 210 may store the reference frame data received from the input terminal. The motion vector detection circuit 211 detects or determines motion vector(s) by reading out previous frame data stored in the frame memory 210, using such read frame data as a so-called search frame, and determining/detecting which blocks or positions of blocks of the search frame correspond to each block of a received reference frame. During such motion vector detection processing, a motion vector detection or search range may be utilized which has a pre-set size. The motion vector obtained by the motion vector detection circuit 211 is supplied to the motion compensation circuit 209 and the variable length encoding circuit 204.
In addition to the reference frame data from the input terminal, the subtraction circuit 201 receives motion compensated frame data from the motion compensation circuit 209. The subtraction circuit 201 subtracts the received data so as to obtain the difference between the reference frame data and the motion compensated frame data. The difference data is supplied to the DCT circuit 202, wherein discrete cosine transform processing is performed. An output signal from the DCT circuit 202 is supplied to the quantization circuit 203, wherein the received data is quantized in a predetermined manner. The quantized data from the quantization circuit 203 is supplied to the variable length encoding circuit 204. Simultaneously, the motion vector from the motion vector detection circuit 211 is also supplied to the variable length encoding circuit 204, as previously described. The variable length encoding circuit 204 encodes the received signals with variable length codes and supplies the encoded data to an output terminal.
The quantized data from the quantization circuit 203 is further supplied to the dequantization circuit 205, wherein processing substantially opposite to that performed by the quantization circuit 203 is performed. An output from the dequantization circuit 205 is supplied to the inverse DCT circuit 206, wherein processing substantially opposite to that performed by the DCT circuit 202 is performed so as to obtain the current frame data. Such current frame data is supplied to one input of the addition circuit 207 and the motion compensated frame data from the motion compensation circuit 209 is supplied to another input of the addition circuit. The addition circuit 207 adds or combines the received signals and supplies an added output signal to the frame memory 208, whereupon such output signal may be stored therein.
The motion compensation circuit 209 receives the motion vector detected by the motion vector detection circuit 211 and reads previously stored frame data from the frame memory 208. The motion compensation circuit 209 performs motion compensation processing on the received data so as to form motion compensated frame data which is supplied to the subtraction circuit 201 and the addition circuit 207, as previously described.
With regard to the processing or coding performed by the variable length encoding circuit 204, the length of a variable length code in a table which may be utilized by the variable length encoding circuit 204 may vary with the size of the search range used by the motion vector detection circuit 211. For example, the length or size of the code in the variable length code table may increase as the size of the search range increases. As a result, if the motion vector detection processing is performed utilizing a search range having a constant size, the code length allocated for a motion vector may be larger than needed as, for example, in the situation wherein a moving picture having relatively little motion is being processed. Thus, such processing or encoding may produce a larger amount of information than may be necessary.
Further, if the search range is larger than needed or larger than the actual movement, a motion vector may be erroneously detected which corresponds to a motion larger than the actual motion. In this situation, the length of the code(s) assigned to the erroneously large motion vector is larger than that of the correct motion vector and, as a result, the amount of information produced from encoding this erroneous motion vector is increased.
Furthermore, variable length encoding the difference between the reference frame data and the motion-compensated previous frame data may result in a distribution of motion vectors which is not smooth. As a result, the amount of information produced from encoding the motion vector may be increased.